package com.changfen.concurrent;

import java.util.concurrent.ExecutionException;
import java.util.function.Function;

/**
 * @author changfeng.chen@things-matrix.com
 * @date 2022/9/7 16:37
 **/
public class FunctionTest {
    public static void main(String[] args) throws ExecutionException, InterruptedException {
        Function<String, Integer> func = x -> x.length();

        Integer apply = func.apply("chenchangfeng");

        System.out.println(apply);
    }


    public Integer getLength(String str) {
        return str.length();
    }
}
